Shader "Stencil/stencilObj"
{
    Properties
    {
        _ID("Mask ID", Int) = 1
		_BaseColor("Base Color", Color) = (0, 1, 0, 1)
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" "Queue" = "Geometry+2" }
        LOD 100
        Stencil {
            Ref [_ID]
            Comp equal
        }
        Pass
        {
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag

            float4 vert (float4 v:POSITION) : SV_POSITION
            {
                return UnityObjectToClipPos(v);
            }

            fixed4 _BaseColor;

            fixed4 frag () : SV_Target
            {
                return _BaseColor;
            }
            ENDCG

        }
    }
}
